<?php
declare (strict_types = 1);
namespace app\adminapi\lists\system\auth;
use adminmatrix\server\app\lists\BaseListsData;
use app\adminapi\model\system\auth\AdminUser as AdminUserListsModel;
class AdminUserLists extends BaseListsData
{
     protected function initialization() : void
     {
          # 你的model模型放在这里
          $this->model = new AdminUserListsModel;
     }
    /**
    * @notes 列表数据
    * @return array|object
    */
    public function lists() : array | object
    {
        return $this->model->with(['role' , 'info']) -> withAttr('role', function ($query){
            return $query->column('role_id');
        });
    }

   /**
    * @notes 列表数量
    * @return int
    */
    public function count() : int
    {
        return (new AdminUserListsModel)->count();
    }
}